package fr.insta.reverse.uml.dao;

public class DaoFactory
{

	public static IDao<?> getDao(DaoName dao)
	{
		Object o = null;

		try
		{
			Class<?> clazz = Class.forName("fr.insta.reverse.uml.dao.Dao" + dao.getNom());
			o = clazz.newInstance();
		}
		catch (InstantiationException | IllegalAccessException | ClassNotFoundException e)
		{
			e.printStackTrace();
		}
		return (IDao<?>) o;
	}

}
